<?php

namespace appcode\enum;

class ReadingType implements IEnumBaseClass {
    const Electricity = "electricity";
    const Water = "water";

    public static function GetArray() {
        return array(1 => self::Electricity, 2 => self::Water);
    }

    public static function GetById($id){
        return EnumBaseClassHelper::GetById(self::GetArray(), $id);
    }

    public static function GetByName($name) {
        return EnumBaseClassHelper::GetByName(self::GetArray(), $name);
    }

    public static function GetDefaultId() {
        return EnumBaseClassHelper::GetDefaultId(self::GetArray(), self::GetDefaultName());
    }

    public static function GetDefaultName() {
        return self::Electricity;
    }
}